from transformers import pipeline
from langchain_community.llms import HuggingFacePipeline
pipe = pipeline("text-classification",device="cuda:0",model="distilbert/distilbert-base-uncased-finetuned-sst-2-english")
# print(pipe("This restaurant is awesome"))
# print(pipe("我不喜欢你"))
for i in range(5):
    print(pipe.predict("This restaurant is awesome"))

# hf = HuggingFacePipeline(pipeline=pipe)
# hf.invoke("This restaurant is awesome")




